//
//  UserDefaultDataHelper.m
//  OfficeBook
//
//  Created by 朱 琳 on 15/10/7.
//  Copyright (c) 2015年 sunny. All rights reserved.
//

#import "UserDefaultDataHelper.h"

NSString * const UserDefaultKeyCityList        = @"city_list";
NSString * const UserDefaultKeyRoomList        = @"room_list";
NSString * const UserDefaultKeyCookie          = @"cookie";
NSString * const UserDefaultKeyUserEmail       = @"user_email";
NSString * const UserDefaultKeyUserUserName    = @"user_name";
NSString * const UserDefaultKeyUserfirstName   = @"first_name";
NSString * const UserDefaultKeyUserlastName    = @"last_name";

@implementation UserDefaultDataHelper

+(void) storeData:(id)data WithKey:(NSString *)key{
    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
    [userDefaults setObject:data forKey:key];
    [userDefaults synchronize];
}
+(id) getDataWithKey:(NSString *)key{
    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
    return [userDefaults objectForKey:key];
}

+(void)removeDataWithKey:(NSString *)key {
    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
    [userDefaults removeObjectForKey:key];
    [userDefaults synchronize];
}

@end
